﻿using System;
using System.Collections.Generic;
using System.Data.Objects;
using System.Linq;
using System.Linq.Expressions;
using System.Text;

namespace EBA.Data
{
    public class EntityTransientRepository<Entity, IEntity> : EntityRepository<Entity, IEntity>, ITransientRepository<IEntity> where Entity : class,IEntity, new()
    {

        public EntityTransientRepository(ObjectSet<Entity> table, params string[] includes)
            : base(table, includes)
        {
        }

        public EntityTransientRepository(ObjectSet<Entity> table, Expression<Func<ITransientRepository<IEntity>>> createTransient, params string[] includes)
            : base(table, createTransient, includes)
        {
        }

        public void SumitChanges()
        {
            this.Table.Context.SaveChanges();
        }


    }
}
